package com.imooc.o2o.util;

/**
 * Created by PopQing on 2018/4/21.
 */
public class PathUtil {
    private static String seperator = System.getProperty("file.seperator");
    public static String getImgBasePath(){
        String os = System.getProperty("os.name");
        String basePath = "";
        if(os.toLowerCase().startsWith("win")){
            basePath = "D:/Projectdev/image/";
        } else {
            basePath = "/home/image";
        }
        basePath = basePath.replace("/",seperator);
        return basePath;
    }

    public static String getShopIamgePath(long shopId){
        String imagePath = "/upload/item/shop"+shopId+"/";
        return imagePath.replace("/",seperator);
    }
}
